
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module src.quatfit</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="src.html"><font color="#ffffff">src</font></a>.quatfit</strong></big></big> (28 February 2006)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/user/yhuang/pdb2pqr/trunk/pdb2pqr/src/quatfit.py">/user/yhuang/pdb2pqr/trunk/pdb2pqr/src/quatfit.py</a></font></td></tr></table>
    <p><tt>Quatfit&nbsp;routines&nbsp;for&nbsp;PDB2PQR<br>
&nbsp;<br>
This&nbsp;module&nbsp;is&nbsp;used&nbsp;to&nbsp;find&nbsp;the&nbsp;coordinates&nbsp;of&nbsp;a&nbsp;new<br>
atom&nbsp;based&nbsp;on&nbsp;a&nbsp;reference&nbsp;set&nbsp;of<br>
coordinates&nbsp;and&nbsp;a&nbsp;definition&nbsp;set&nbsp;of&nbsp;coordinates.<br>
&nbsp;<br>
Original&nbsp;Code&nbsp;by&nbsp;David&nbsp;J.&nbsp;Heisterberg<br>
The&nbsp;Ohio&nbsp;Supercomputer&nbsp;Center<br>
1224&nbsp;Kinnear&nbsp;Rd.<br>
Columbus,&nbsp;OH&nbsp;&nbsp;43212-1163<br>
(614)292-6036<br>
djh@osc.edu&nbsp;&nbsp;&nbsp;&nbsp;djh@ohstpy.bitnet&nbsp;&nbsp;&nbsp;&nbsp;ohstpy::djh<br>
&nbsp;<br>
Translated&nbsp;to&nbsp;C&nbsp;from&nbsp;fitest.f&nbsp;program&nbsp;and&nbsp;interfaced&nbsp;with<br>
Xmol&nbsp;program&nbsp;by&nbsp;Jan&nbsp;Labanowski,&nbsp;&nbsp;jkl@osc.edu&nbsp;&nbsp;&nbsp;jkl@ohstpy.bitnet<br>
ohstpy::jkl<br>
&nbsp;<br>
----------------------------<br>
&nbsp;<br>
PDB2PQR&nbsp;--&nbsp;An&nbsp;automated&nbsp;pipeline&nbsp;for&nbsp;the&nbsp;setup,&nbsp;execution,&nbsp;and&nbsp;analysis&nbsp;of<br>
Poisson-Boltzmann&nbsp;electrostatics&nbsp;calculations<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Copyright&nbsp;(c)&nbsp;2002-2010,&nbsp;Jens&nbsp;Erik&nbsp;Nielsen,&nbsp;University&nbsp;College&nbsp;Dublin;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Nathan&nbsp;A.&nbsp;Baker,&nbsp;Washington&nbsp;University&nbsp;in&nbsp;St.&nbsp;Louis;&nbsp;Paul&nbsp;Czodrowski&nbsp;&amp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Gerhard&nbsp;Klebe,&nbsp;University&nbsp;of&nbsp;Marburg<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;All&nbsp;rights&nbsp;reserved.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Redistribution&nbsp;and&nbsp;use&nbsp;in&nbsp;source&nbsp;and&nbsp;binary&nbsp;forms,&nbsp;with&nbsp;or&nbsp;without&nbsp;modification,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;are&nbsp;permitted&nbsp;provided&nbsp;that&nbsp;the&nbsp;following&nbsp;conditions&nbsp;are&nbsp;met:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Redistributions&nbsp;of&nbsp;source&nbsp;code&nbsp;must&nbsp;retain&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Redistributions&nbsp;in&nbsp;binary&nbsp;form&nbsp;must&nbsp;reproduce&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer&nbsp;in&nbsp;the&nbsp;documentation&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and/or&nbsp;other&nbsp;materials&nbsp;provided&nbsp;with&nbsp;the&nbsp;distribution.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Neither&nbsp;the&nbsp;names&nbsp;of&nbsp;University&nbsp;College&nbsp;Dublin,&nbsp;Washington&nbsp;University&nbsp;in&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;St.&nbsp;Louis,&nbsp;or&nbsp;University&nbsp;of&nbsp;Marburg&nbsp;nor&nbsp;the&nbsp;names&nbsp;of&nbsp;its&nbsp;contributors&nbsp;may&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;used&nbsp;to&nbsp;endorse&nbsp;or&nbsp;promote&nbsp;products&nbsp;derived&nbsp;from&nbsp;this&nbsp;software&nbsp;without&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;specific&nbsp;prior&nbsp;written&nbsp;permission.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;THIS&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;BY&nbsp;THE&nbsp;COPYRIGHT&nbsp;HOLDERS&nbsp;AND&nbsp;CONTRIBUTORS&nbsp;"AS&nbsp;IS"&nbsp;AND&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ANY&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED&nbsp;WARRANTIES,&nbsp;INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO,&nbsp;THE&nbsp;IMPLIED&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY&nbsp;AND&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE&nbsp;ARE&nbsp;DISCLAIMED.&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;IN&nbsp;NO&nbsp;EVENT&nbsp;SHALL&nbsp;THE&nbsp;COPYRIGHT&nbsp;OWNER&nbsp;OR&nbsp;CONTRIBUTORS&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DIRECT,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;INDIRECT,&nbsp;INCIDENTAL,&nbsp;SPECIAL,&nbsp;EXEMPLARY,&nbsp;OR&nbsp;CONSEQUENTIAL&nbsp;DAMAGES&nbsp;(INCLUDING,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO,&nbsp;PROCUREMENT&nbsp;OF&nbsp;SUBSTITUTE&nbsp;GOODS&nbsp;OR&nbsp;SERVICES;&nbsp;LOSS&nbsp;OF&nbsp;USE,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;DATA,&nbsp;OR&nbsp;PROFITS;&nbsp;OR&nbsp;BUSINESS&nbsp;INTERRUPTION)&nbsp;HOWEVER&nbsp;CAUSED&nbsp;AND&nbsp;ON&nbsp;ANY&nbsp;THEORY&nbsp;OF&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;LIABILITY,&nbsp;WHETHER&nbsp;IN&nbsp;CONTRACT,&nbsp;STRICT&nbsp;LIABILITY,&nbsp;OR&nbsp;TORT&nbsp;(INCLUDING&nbsp;NEGLIGENCE&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;OR&nbsp;OTHERWISE)&nbsp;ARISING&nbsp;IN&nbsp;ANY&nbsp;WAY&nbsp;OUT&nbsp;OF&nbsp;THE&nbsp;USE&nbsp;OF&nbsp;THIS&nbsp;SOFTWARE,&nbsp;EVEN&nbsp;IF&nbsp;ADVISED&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;OF&nbsp;THE&nbsp;POSSIBILITY&nbsp;OF&nbsp;SUCH&nbsp;DAMAGE.<br>
&nbsp;<br>
----------------------------</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="string.html">string</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-center"><strong>center</strong></a>(numpoints, refcoords)</dt><dd><tt>Center&nbsp;a&nbsp;molecule&nbsp;using&nbsp;equally&nbsp;weighted&nbsp;points<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;numpoints:&nbsp;Number&nbsp;of&nbsp;points<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcoords:&nbsp;List&nbsp;of&nbsp;reference&nbsp;coordinates,&nbsp;with&nbsp;each&nbsp;set<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;list&nbsp;of&nbsp;form&nbsp;[x,y,z]&nbsp;(list)<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcenter:&nbsp;Center&nbsp;of&nbsp;the&nbsp;set&nbsp;of&nbsp;points&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;relcoords:&nbsp;Moved&nbsp;refcoords&nbsp;relative&nbsp;to&nbsp;refcenter&nbsp;(list)</tt></dd></dl>
 <dl><dt><a name="-findCoordinates"><strong>findCoordinates</strong></a>(numpoints, refcoords, defcoords, defatomcoords)</dt><dd><tt>Driver&nbsp;for&nbsp;the&nbsp;quaternion&nbsp;file.&nbsp;&nbsp;Provide&nbsp;the&nbsp;coordinates&nbsp;as&nbsp;inputs<br>
and&nbsp;obtain&nbsp;the&nbsp;coordinates&nbsp;for&nbsp;the&nbsp;new&nbsp;atom&nbsp;as&nbsp;output.<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;numpoints:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;number&nbsp;of&nbsp;points&nbsp;in&nbsp;each&nbsp;list&nbsp;(int)<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcoords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;reference&nbsp;coordinates,&nbsp;a&nbsp;list&nbsp;of&nbsp;lists&nbsp;of&nbsp;form<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[x,y,z]&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;defcoords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;definition&nbsp;coordinates,&nbsp;a&nbsp;list&nbsp;of&nbsp;lists&nbsp;of&nbsp;form<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[x,y,z]&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;defatomcoords:&nbsp;The&nbsp;definition&nbsp;coordinates&nbsp;for&nbsp;the&nbsp;atom&nbsp;to&nbsp;be<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;placed&nbsp;in&nbsp;the&nbsp;reference&nbsp;frame&nbsp;(list)<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;newcoords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;coordinates&nbsp;of&nbsp;the&nbsp;new&nbsp;atom&nbsp;in&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reference&nbsp;frame&nbsp;(list)</tt></dd></dl>
 <dl><dt><a name="-jacobi"><strong>jacobi</strong></a>(a, nrot)</dt><dd><tt>Jacobi&nbsp;diagonalizer&nbsp;with&nbsp;sorted&nbsp;output,&nbsp;only&nbsp;good&nbsp;for&nbsp;4x4&nbsp;matrices<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;a:&nbsp;&nbsp;&nbsp;&nbsp;Matrix&nbsp;to&nbsp;diagonalize&nbsp;(4x4&nbsp;list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;nrot:&nbsp;Maximum&nbsp;number&nbsp;of&nbsp;sweeps<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;d:&nbsp;&nbsp;&nbsp;&nbsp;Eigenvalues<br>
&nbsp;&nbsp;&nbsp;&nbsp;v:&nbsp;&nbsp;&nbsp;&nbsp;Eigenvectors</tt></dd></dl>
 <dl><dt><a name="-q2mat"><strong>q2mat</strong></a>(q)</dt><dd><tt>Generate&nbsp;a&nbsp;left&nbsp;rotation&nbsp;matrix&nbsp;from&nbsp;a&nbsp;normalized&nbsp;quaternion<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;q:&nbsp;&nbsp;The&nbsp;normalized&nbsp;quaternion&nbsp;(list)<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;u:&nbsp;&nbsp;The&nbsp;rotation&nbsp;matrix&nbsp;(2-dimensional&nbsp;list)</tt></dd></dl>
 <dl><dt><a name="-qchichange"><strong>qchichange</strong></a>(initcoords, refcoords, angle)</dt><dd><tt>Change&nbsp;the&nbsp;chiangle&nbsp;of&nbsp;the&nbsp;reference&nbsp;coordinate&nbsp;using&nbsp;the<br>
initcoords&nbsp;and&nbsp;the&nbsp;given&nbsp;angle<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;initcoords:&nbsp;Coordinates&nbsp;based&nbsp;on&nbsp;the&nbsp;point&nbsp;and&nbsp;basis&nbsp;atoms<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(one&nbsp;dimensional&nbsp;list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;difchi&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;The&nbsp;angle&nbsp;to&nbsp;use&nbsp;(float)<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcoords&nbsp;:&nbsp;The&nbsp;atoms&nbsp;to&nbsp;analyze&nbsp;(list&nbsp;of&nbsp;many&nbsp;coordinates)<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;newcoords&nbsp;:&nbsp;The&nbsp;new&nbsp;coordinates&nbsp;of&nbsp;the&nbsp;atoms&nbsp;(list&nbsp;of&nbsp;many&nbsp;coords)</tt></dd></dl>
 <dl><dt><a name="-qfit"><strong>qfit</strong></a>(numpoints, refcoords, defcoords)</dt><dd><tt>Method&nbsp;for&nbsp;getting&nbsp;new&nbsp;atom&nbsp;coordinates&nbsp;from&nbsp;sets&nbsp;of&nbsp;reference<br>
and&nbsp;definition&nbsp;coordinates.<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;numpoints:&nbsp;The&nbsp;number&nbsp;of&nbsp;points&nbsp;in&nbsp;each&nbsp;list&nbsp;(int)<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcoords:&nbsp;List&nbsp;of&nbsp;reference&nbsp;coordinates,&nbsp;with&nbsp;each&nbsp;set<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;list&nbsp;of&nbsp;form&nbsp;[x,y,z]&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;defcoords:&nbsp;List&nbsp;of&nbsp;definition&nbsp;coordinates,&nbsp;with&nbsp;each&nbsp;set<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;list&nbsp;of&nbsp;form&nbsp;[x,y,z]&nbsp;(list)</tt></dd></dl>
 <dl><dt><a name="-qtransform"><strong>qtransform</strong></a>(numpoints, defcoords, refcenter, fitcenter, rotation)</dt><dd><tt>Transform&nbsp;the&nbsp;set&nbsp;of&nbsp;defcoords&nbsp;using&nbsp;the&nbsp;reference&nbsp;center,&nbsp;the&nbsp;fit<br>
center,&nbsp;and&nbsp;a&nbsp;rotation&nbsp;matrix.<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;numpoints:&nbsp;The&nbsp;number&nbsp;of&nbsp;points&nbsp;in&nbsp;each&nbsp;list&nbsp;(int)<br>
&nbsp;&nbsp;&nbsp;&nbsp;defcoords:&nbsp;Definition&nbsp;coordinates&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcenter:&nbsp;The&nbsp;reference&nbsp;center&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;defcenter:&nbsp;The&nbsp;definition&nbsp;center&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;rotation:&nbsp;&nbsp;The&nbsp;rotation&nbsp;matrix&nbsp;(list)<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;newcoords:&nbsp;The&nbsp;coordinates&nbsp;of&nbsp;the&nbsp;new&nbsp;point&nbsp;(list)</tt></dd></dl>
 <dl><dt><a name="-qtrfit"><strong>qtrfit</strong></a>(numpoints, defcoords, refcoords, nrot)</dt><dd><tt>Find&nbsp;the&nbsp;quaternion,&nbsp;q,&nbsp;[and&nbsp;left&nbsp;rotation&nbsp;matrix,&nbsp;u]&nbsp;that&nbsp;minimizes<br>
&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;qTXq&nbsp;-&nbsp;Y&nbsp;|&nbsp;^&nbsp;2&nbsp;[|uX&nbsp;-&nbsp;Y|&nbsp;^&nbsp;2]<br>
This&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;maximizing&nbsp;Re&nbsp;(qTXTqY)<br>
The&nbsp;left&nbsp;rotation&nbsp;matrix,&nbsp;u,&nbsp;is&nbsp;obtained&nbsp;from&nbsp;q&nbsp;by<br>
&nbsp;&nbsp;&nbsp;&nbsp;u&nbsp;=&nbsp;qT1q<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;numpoints:&nbsp;The&nbsp;number&nbsp;of&nbsp;points&nbsp;in&nbsp;each&nbsp;list&nbsp;(int)<br>
&nbsp;&nbsp;&nbsp;&nbsp;defcoords:&nbsp;List&nbsp;of&nbsp;definition&nbsp;coordinates,&nbsp;with&nbsp;each&nbsp;set<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;list&nbsp;of&nbsp;form&nbsp;[x,y,z]&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcoords:&nbsp;List&nbsp;of&nbsp;fitted&nbsp;coordinates,&nbsp;with&nbsp;each&nbsp;set<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;list&nbsp;of&nbsp;form&nbsp;[x,y,z]&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;nrot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;The&nbsp;maximum&nbsp;number&nbsp;of&nbsp;jacobi&nbsp;sweeps<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;q&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;The&nbsp;best-fit&nbsp;quaternion<br>
&nbsp;&nbsp;&nbsp;&nbsp;u&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;The&nbsp;best-fit&nbsp;left&nbsp;rotation&nbsp;matrix</tt></dd></dl>
 <dl><dt><a name="-rotmol"><strong>rotmol</strong></a>(numpoints, x, u)</dt><dd><tt>Rotate&nbsp;a&nbsp;molecule<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;numpoints:&nbsp;&nbsp;The&nbsp;number&nbsp;of&nbsp;points&nbsp;in&nbsp;the&nbsp;list&nbsp;(int)<br>
&nbsp;&nbsp;&nbsp;&nbsp;x:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;input&nbsp;coordinates&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;u:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;left&nbsp;rotation&nbsp;matrix&nbsp;(list)<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;out:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;rotated&nbsp;coordinates&nbsp;out=u&nbsp;*&nbsp;x&nbsp;(list)</tt></dd></dl>
 <dl><dt><a name="-translate"><strong>translate</strong></a>(numpoints, refcoords, center, mode)</dt><dd><tt>Translate&nbsp;a&nbsp;molecule&nbsp;using&nbsp;equally&nbsp;weighted&nbsp;points<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;numpoints:&nbsp;Number&nbsp;of&nbsp;points<br>
&nbsp;&nbsp;&nbsp;&nbsp;refcoords:&nbsp;List&nbsp;of&nbsp;reference&nbsp;coordinates,&nbsp;with&nbsp;each&nbsp;set<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;list&nbsp;of&nbsp;form&nbsp;[x,y,z]&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;center:&nbsp;&nbsp;&nbsp;&nbsp;Center&nbsp;of&nbsp;the&nbsp;system(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;mode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;1,&nbsp;center&nbsp;will&nbsp;be&nbsp;subtracted&nbsp;from&nbsp;refcoords<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;2,&nbsp;center&nbsp;will&nbsp;be&nbsp;added&nbsp;to&nbsp;refcoords<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;relcoords:&nbsp;Moved&nbsp;refcoords&nbsp;relative&nbsp;to&nbsp;refcenter&nbsp;(list)</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>DIHEDRAL</strong> = 57.2958<br>
<strong>SMALL</strong> = 9.9999999999999995e-08<br>
<strong>__author__</strong> = 'David Heisterberg, Jan Labanowski, Jens Erik Nielsen, Todd Dolinsky'<br>
<strong>__date__</strong> = '28 February 2006'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">David&nbsp;Heisterberg,&nbsp;Jan&nbsp;Labanowski,&nbsp;Jens&nbsp;Erik&nbsp;Nielsen,&nbsp;Todd&nbsp;Dolinsky</td></tr></table>
</body></html>